<%@page import="com.dfhc.util.CryptoHelper"%>
<%@page import="com.dfhc.test.expressorder.IExpressOrderConstants" %>
<%@page import="org.quickbundle.tools.helper.RmJspHelper" %>
<%@page import="org.quickbundle.project.RmGlobalReference" %>
<%@page import="com.dfhc.ISystemConstant" %>
<%@ page contentType="text/html; charset=UTF-8" language="java"%>
     
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="js/h-ui/html5shiv.js"></script>
<script type="text/javascript" src="js/h-ui/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/h-ui/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/h-ui.admin/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/h-ui.admin/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="js/h-ui/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<!--/meta 作为公共模版分离出去-->
<%@ include file="/jsp/include/web/new/global.jsp" %>
<title>添加模板 </title>
<%@ taglib uri="/dfhc" prefix="dfhc" %>
</head>
<body>
	<article class="page-container">
		<div  style="z-index:9999;display:none;" id="organizationContent">
			<div class="zTreeDemoBackground" >
				<ul id="treeDemo" class="ztree"  ></ul>
			</div>
		</div>
	<form action="" method="post" class="form form-horizontal" id="form-carposition-add">
	<%-- 
	<dfhc:region name="save" >
		<c:if  test="${empty  bean}">
		<dfhc:button type="save"  templateId="h_ui_add_button"  onclick="ok('/expressorder/insert');"/>
		</c:if>
		<c:if  test="${not  empty  bean}">
		<dfhc:button type="save"  templateId="h_ui_update_button"  onclick="ok('/expressorder/update');"/>
		</c:if>

	</dfhc:region> --%>
				<dfhc:input   id="id" name="id"  type="hidden" value="${bean.id}" />
				
				 <dfhc:div templateId="h_ui_div_row_cl">
				    <dfhc:title templateId="h_ui_label_title"><%=IExpressOrderConstants.TABLE_COLUMN_DISPLAY.get("expressCompanyName")%>：</dfhc:title>	    
				    <dfhc:div templateId="h_ui_div_fromcontrol">	        
						<dfhc:input style="width: 200px" templateId="h_ui_input" value="${bean.expressCompanyName}" placeholder="" id="expressCompanyName" name="expressCompanyName"/>			
				    </dfhc:div>	    		 
				  </dfhc:div>
				  
				  <dfhc:div templateId="h_ui_div_row_cl">
				    <dfhc:title templateId="h_ui_label_title"><%=IExpressOrderConstants.TABLE_COLUMN_DISPLAY.get("startAddress")%> ：</dfhc:title>	    
				    <dfhc:div templateId="h_ui_div_fromcontrol">	        
						<dfhc:input style="width: 200px" templateId="h_ui_input" value="${bean.startAddress}" placeholder="" id="startAddress" name="startAddress"/>			
				    </dfhc:div>	    		 
				  </dfhc:div>
				  
				  <dfhc:div templateId="h_ui_div_row_cl">
				    <dfhc:title templateId="h_ui_label_title"><%=IExpressOrderConstants.TABLE_COLUMN_DISPLAY.get("endAddress")%>：</dfhc:title>	    
				    <dfhc:div templateId="h_ui_div_fromcontrol">	        
						<dfhc:input style="width: 200px" templateId="h_ui_input" value="${bean.endAddress}" placeholder="" id="endAddress" name="endAddress"/>			
				    </dfhc:div>	    		 
				  </dfhc:div>
				  
				  <dfhc:div templateId="h_ui_div_row_cl">
				    <dfhc:title templateId="h_ui_label_title"><%=IExpressOrderConstants.TABLE_COLUMN_DISPLAY.get("entryMan")%>：</dfhc:title>	    
				    <dfhc:div templateId="h_ui_div_fromcontrol">	        
						<dfhc:input style="width: 200px" templateId="h_ui_input" value="${bean.entryMan}" placeholder="" id="entryMan" name="entryMan"/>			
				    </dfhc:div>	    		 
				  </dfhc:div>
				  
				  <dfhc:div templateId="h_ui_div_row_cl">
				    <dfhc:title templateId="h_ui_label_title"><dfhc:span templateId="h_ui_not_null_span"></dfhc:span><%=IExpressOrderConstants.TABLE_COLUMN_DISPLAY.get("entryTime")%>：</dfhc:title>	    
			            <dfhc:div templateId="h_ui_div_fromcontrol">	        
						<dfhc:input templateId="h_ui_date_input" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="entryTime" name="entryTime"/>
				    </dfhc:div>	    		 
				  </dfhc:div>
				 <dfhc:div templateId="h_ui_div_row_cl">
					<dfhc:div templateId="h_ui_div_pop_up_button">
						<dfhc:button templateId="h_ui_submit_button" />
					</dfhc:div>
				</dfhc:div> 
	</form>
	</article>
<script type="text/javascript">
$(function(){
	//获取新id
	<c:if test="${empty bean}"> 
	$('#id').val(getNewId('<%=IExpressOrderConstants.TABLE_NAME%>'));
	</c:if>
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$("#form-carposition-add").validate({
		rules:{
			expressCompanyName:{			
				required:true,
				minlength:1,
				maxlength:19
			},
			startAddress:{			
				required:true,
				minlength:1,
				maxlength:19
			},
			endAddress:{			
				required:true,
				minlength:1,
				maxlength:19
			},
			entryMan:{			
				required:true,
				minlength:1,
				maxlength:19
			},
			entryTime:{			
				required:true,
				minlength:1,
			}
		},
 		messages: {
 			expressCompanyName:{
		        required: "请输入快递公司名称",
		        minlength: "名称至少由1个字母组成",
		        maxlength: "名称最大长度为19个字母"
	           },
	           startAddress:{
		        required: "请输入起始地址",
		        minlength: "起始地址至少由1个字母组成",
		        maxlength: "起始地址最大长度为19个字母"
	           },
	           endAddress:{
		        required: "请输入结束地址",
		        minlength: "结束地址至少由1个字母组成",
		        maxlength: "结束地址最大长度为9个字母"
	           },
	           entryMan:{
		        required: "请输入录入人",
		        minlength: "录入人至少由1个字母组成",
		        maxlength: "录入人最大长度为19个字母"
	           },
	           entryTime:{
			        required: "请输入日期时间",
			        minlength: "日期时间至少由1个字母组成",
		       }
	    },		
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			<c:if test="${empty bean}"> 
			var url = getRootPath()+"<%=CryptoHelper.encryptUrl(request,"/expressorder/insert")%>?jsguid="+$('#id').val();
			</c:if>
			<c:if test="${not empty bean}"> 
			var url = getRootPath()+"<%=CryptoHelper.encryptUrl(request,"/expressorder/update")%>?jsguid="+$('#id').val();
			</c:if>
			//提交成功关闭
			submitAjax(url,$("#form-carposition-add").serialize()); 		    		    		
			layer_close();			
		}
	});
});
</script>
</body>
</html>